package cn.com.shaom.learning.sb.web.freemarker;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * ClassName: FreemarkerController
 * Description:
 * Date: 2018/1/4 18:42 【需求编号】
 *
 * @author Shaom
 * @version V1.0.0
 */
@Controller
public class FreemarkerController {

    @GetMapping("/index")
    public String hello(Model model) {
        model.addAttribute("msg", "i am Freemarker");
        return "index";
    }

    @GetMapping("/template")
    public String layout(Model model) {
        return "template";
    }
}
